Repository navigation
Logs: the lines before a warning or a crash kept in the log file - #1903
Open
vmillet-dev wants to merge 1 commit into
Open
vmillet-dev wants to merge 1 commit into
vmillet-dev wants to merge 1 commit into
Conversation
The file's writer is now one of ours, Kept, wrapping flexi_logger's: it keeps the last 200 lines of our crates below what the file keeps, the lines the terminal shows under the levels in force, and writes them into the file before the next warning, error or panic, under one line that says how many. A second warning brings only what came after the first. Lines are formatted as they come, time and thread included, and the file's writer writes them as they are; a dependency's lines are never kept. The e2e flavour, whose file keeps every level, keeps none. The panic hook needs no change: its error line brings the ring first. docs/security.md says what the file may hold; the wiki's logs page, D35 and CONTRIBUTING say it too. Closes #1845 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01BbVs5tCyTr9AasGra3Zzg3
This was referenced Dec 4, 2026
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1845
A writer of ours,
Kept(crates/app/src/logging.rs), wrapsflexi_logger'sFileLogWriter. Nothing changes for whoever logs.Keptkeeps the last 200 lines below what the file keeps, of our crates alone, and only those that passed the levels in force (what the terminal shows). A dependency's lines are never kept, even whenDEVNOTES_LOGlets them through: itsdebugmay hold a path or a URL.— the 37 lines before —,— the line before —), and then emptied. A second warning brings only what came after the first.verbatim: a kept line keeps its time.docs/security.mdnow states what the file may hold and that nothing sealed is in it.What our crates log below
warn, checked because those lines now reach the file:infoline, « Library copied to », for the launch backup. It was already on a release's terminal. The path is the profile's, never a note's content.Tests (
logging::tests; each process run apart has its own logger)a_warning_is_filed_after_the_lines_that_led_to_it_and_the_next_after_those_since: a debug build writes info and debug lines, a warning, an info line, an error, then an info line. The file holds, in order: « the 3 lines before » (« Logging at », the action, the call), the warning, « the line before », the action, the error. The line after the error is not in the file.the_last_two_hundred_lines_are_kept: 250 lines, then a warning. The file holds « the 200 lines before », steps 51 to 250, and not step 50.a_dependency_line_is_never_kept_for_the_file: withDEVNOTES_LOG=debug, a dependency'sdebugreaches the terminal but not the file; ours does.a_panic_ends_the_process_once_its_place_is_in_the_log: an action line is logged, then the process panics. Its file holds that line, then « Panicked at », and never the message.warnafter the last warning, so « the file keeps warnings alone » still holds when nothing follows.Docs. The wiki's logs page gets a new section, « The lines before a warning », and its outputs paragraph points to it. D35's row reads « File:
warnanderror, after our last 200 lines » and keeps its width.CONTRIBUTING.mdanddocs/security.mdare updated too.Checks run (Linux)
cargo test -p app: 31 + 1 + 1 pass.01_first_dayunder Xvfb: green; its debug lines are still in its log.cargo clippy --workspace --all-targets --all-features -- -D warnings,cargo fmt --all --check,node scripts/architecture-links.mjs.Generated by Claude Code